# -*- coding: utf-8 -*-

import numpy as np

#中文

def Contain(item, npList):
    iLen = npList.shape
    i = 0
    flag = 0
    
    while i < iLen[0]:
        if npList[i] == item:
            flag = 1
        i= i+1
    return flag

a = np.array([[1,2,3,4,5],[2,3,4,5,6]])
b = np.array([2,4,6,8,10])
c = a * b
d = np.sqrt(b)
e = [1,2,3,4,5]
f = np.array([], dtype='float')
for item in b:
    f=np.append(f, float(item)/sum(b))


a[:,:-1] = a[:,:-1] * b[:-1]
print a

